\(\int \frac {1}{(3+5 \tan (c+d x))^4} \, dx\) [498]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 12, antiderivative size = 88 \[ \int \frac {1}{(3+5 \tan (c+d x))^4} \, dx=-\frac {161 x}{334084}-\frac {60 \log (3 \cos (c+d x)+5 \sin (c+d x))}{83521 d}-\frac {5}{102 d (3+5 \tan (c+d x))^3}-\frac {15}{1156 d (3+5 \tan (c+d x))^2}-\frac {5}{19652 d (3+5 \tan (c+d x))} \]

[Out]

-161/334084*x-60/83521*ln(3*cos(d*x+c)+5*sin(d*x+c))/d-5/102/d/(3+5*tan(d*x+c))^3-15/1156/d/(3+5*tan(d*x+c))^2
-5/19652/d/(3+5*tan(d*x+c))

Rubi [A] (verified)

Time = 0.14 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3564, 3610, 3612, 3611} \[ \int \frac {1}{(3+5 \tan (c+d x))^4} \, dx=-\frac {5}{19652 d (5 \tan (c+d x)+3)}-\frac {15}{1156 d (5 \tan (c+d x)+3)^2}-\frac {5}{102 d (5 \tan (c+d x)+3)^3}-\frac {60 \log (5 \sin (c+d x)+3 \cos (c+d x))}{83521 d}-\frac {161 x}{334084} \]

[In]

Int[(3 + 5*Tan[c + d*x])^(-4),x]

[Out]

(-161*x)/334084 - (60*Log[3*Cos[c + d*x] + 5*Sin[c + d*x]])/(83521*d) - 5/(102*d*(3 + 5*Tan[c + d*x])^3) - 15/
(1156*d*(3 + 5*Tan[c + d*x])^2) - 5/(19652*d*(3 + 5*Tan[c + d*x]))

Rule 3564

Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((a + b*Tan[c + d*x])^(n + 1)/(d*(n + 1)*
(a^2 + b^2))), x] + Dist[1/(a^2 + b^2), Int[(a - b*Tan[c + d*x])*(a + b*Tan[c + d*x])^(n + 1), x], x] /; FreeQ
[{a, b, c, d}, x] && NeQ[a^2 + b^2, 0] && LtQ[n, -1]

Rule 3610

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b
*c - a*d)*((a + b*Tan[e + f*x])^(m + 1)/(f*(m + 1)*(a^2 + b^2))), x] + Dist[1/(a^2 + b^2), Int[(a + b*Tan[e +
f*x])^(m + 1)*Simp[a*c + b*d - (b*c - a*d)*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c
 - a*d, 0] && NeQ[a^2 + b^2, 0] && LtQ[m, -1]

Rule 3611

Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(c/(b*f))
*Log[RemoveContent[a*Cos[e + f*x] + b*Sin[e + f*x], x]], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d,
0] && NeQ[a^2 + b^2, 0] && EqQ[a*c + b*d, 0]

Rule 3612

Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(a*c +
b*d)*(x/(a^2 + b^2)), x] + Dist[(b*c - a*d)/(a^2 + b^2), Int[(b - a*Tan[e + f*x])/(a + b*Tan[e + f*x]), x], x]
 /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[a*c + b*d, 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {5}{102 d (3+5 \tan (c+d x))^3}+\frac {1}{34} \int \frac {3-5 \tan (c+d x)}{(3+5 \tan (c+d x))^3} \, dx \\ & = -\frac {5}{102 d (3+5 \tan (c+d x))^3}-\frac {15}{1156 d (3+5 \tan (c+d x))^2}+\frac {\int \frac {-16-30 \tan (c+d x)}{(3+5 \tan (c+d x))^2} \, dx}{1156} \\ & = -\frac {5}{102 d (3+5 \tan (c+d x))^3}-\frac {15}{1156 d (3+5 \tan (c+d x))^2}-\frac {5}{19652 d (3+5 \tan (c+d x))}+\frac {\int \frac {-198-10 \tan (c+d x)}{3+5 \tan (c+d x)} \, dx}{39304} \\ & = -\frac {161 x}{334084}-\frac {5}{102 d (3+5 \tan (c+d x))^3}-\frac {15}{1156 d (3+5 \tan (c+d x))^2}-\frac {5}{19652 d (3+5 \tan (c+d x))}-\frac {60 \int \frac {5-3 \tan (c+d x)}{3+5 \tan (c+d x)} \, dx}{83521} \\ & = -\frac {161 x}{334084}-\frac {60 \log (3 \cos (c+d x)+5 \sin (c+d x))}{83521 d}-\frac {5}{102 d (3+5 \tan (c+d x))^3}-\frac {15}{1156 d (3+5 \tan (c+d x))^2}-\frac {5}{19652 d (3+5 \tan (c+d x))} \\ \end{align*}

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 1.16 (sec) , antiderivative size = 87, normalized size of antiderivative = 0.99 \[ \int \frac {1}{(3+5 \tan (c+d x))^4} \, dx=\frac {(720+483 i) \log (i-\tan (c+d x))+(720-483 i) \log (i+\tan (c+d x))-1440 \log (3+5 \tan (c+d x))-\frac {170 \left (1064+855 \tan (c+d x)+75 \tan ^2(c+d x)\right )}{(3+5 \tan (c+d x))^3}}{2004504 d} \]

[In]

Integrate[(3 + 5*Tan[c + d*x])^(-4),x]

[Out]

((720 + 483*I)*Log[I - Tan[c + d*x]] + (720 - 483*I)*Log[I + Tan[c + d*x]] - 1440*Log[3 + 5*Tan[c + d*x]] - (1
70*(1064 + 855*Tan[c + d*x] + 75*Tan[c + d*x]^2))/(3 + 5*Tan[c + d*x])^3)/(2004504*d)

Maple [A] (verified)

Time = 0.35 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.94

method result size
derivativedivides \(\frac {\frac {30 \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{83521}-\frac {161 \arctan \left (\tan \left (d x +c \right )\right )}{334084}-\frac {5}{102 \left (3+5 \tan \left (d x +c \right )\right )^{3}}-\frac {15}{1156 \left (3+5 \tan \left (d x +c \right )\right )^{2}}-\frac {5}{19652 \left (3+5 \tan \left (d x +c \right )\right )}-\frac {60 \ln \left (3+5 \tan \left (d x +c \right )\right )}{83521}}{d}\) \(83\)
default \(\frac {\frac {30 \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{83521}-\frac {161 \arctan \left (\tan \left (d x +c \right )\right )}{334084}-\frac {5}{102 \left (3+5 \tan \left (d x +c \right )\right )^{3}}-\frac {15}{1156 \left (3+5 \tan \left (d x +c \right )\right )^{2}}-\frac {5}{19652 \left (3+5 \tan \left (d x +c \right )\right )}-\frac {60 \ln \left (3+5 \tan \left (d x +c \right )\right )}{83521}}{d}\) \(83\)
risch \(-\frac {161 x}{334084}+\frac {60 i x}{83521}+\frac {120 i c}{83521 d}+\frac {\left (\frac {875}{75502984}-\frac {5825 i}{226508952}\right ) \left (391884 \,{\mathrm e}^{4 i \left (d x +c \right )}+531675 i {\mathrm e}^{2 i \left (d x +c \right )}+114393 \,{\mathrm e}^{2 i \left (d x +c \right )}-116591+67425 i\right )}{d \left (17 \,{\mathrm e}^{2 i \left (d x +c \right )}-8+15 i\right )^{3}}-\frac {60 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {8}{17}+\frac {15 i}{17}\right )}{83521 d}\) \(97\)
norman \(\frac {-\frac {4347 x}{334084}-\frac {21735 x \tan \left (d x +c \right )}{334084}-\frac {36225 x \left (\tan ^{2}\left (d x +c \right )\right )}{334084}-\frac {20125 x \left (\tan ^{3}\left (d x +c \right )\right )}{334084}+\frac {166250 \left (\tan ^{3}\left (d x +c \right )\right )}{397953 d}+\frac {22325 \tan \left (d x +c \right )}{58956 d}+\frac {131875 \left (\tan ^{2}\left (d x +c \right )\right )}{176868 d}}{\left (3+5 \tan \left (d x +c \right )\right )^{3}}-\frac {60 \ln \left (3+5 \tan \left (d x +c \right )\right )}{83521 d}+\frac {30 \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{83521 d}\) \(119\)
parallelrisch \(-\frac {1630125 \left (\tan ^{3}\left (d x +c \right )\right ) x d +2430000 \ln \left (\frac {3}{5}+\tan \left (d x +c \right )\right ) \left (\tan ^{3}\left (d x +c \right )\right )-1215000 \ln \left (1+\tan ^{2}\left (d x +c \right )\right ) \left (\tan ^{3}\left (d x +c \right )\right )+2934225 \left (\tan ^{2}\left (d x +c \right )\right ) x d +4374000 \ln \left (\frac {3}{5}+\tan \left (d x +c \right )\right ) \left (\tan ^{2}\left (d x +c \right )\right )-2187000 \ln \left (1+\tan ^{2}\left (d x +c \right )\right ) \left (\tan ^{2}\left (d x +c \right )\right )+1760535 \tan \left (d x +c \right ) x d -11305000 \left (\tan ^{3}\left (d x +c \right )\right )+2624400 \ln \left (\frac {3}{5}+\tan \left (d x +c \right )\right ) \tan \left (d x +c \right )-1312200 \ln \left (1+\tan ^{2}\left (d x +c \right )\right ) \tan \left (d x +c \right )+352107 d x -20176875 \left (\tan ^{2}\left (d x +c \right )\right )+524880 \ln \left (\frac {3}{5}+\tan \left (d x +c \right )\right )-262440 \ln \left (1+\tan ^{2}\left (d x +c \right )\right )-10247175 \tan \left (d x +c \right )}{27060804 d \left (3+5 \tan \left (d x +c \right )\right )^{3}}\) \(225\)

[In]

int(1/(3+5*tan(d*x+c))^4,x,method=_RETURNVERBOSE)

[Out]

1/d*(30/83521*ln(1+tan(d*x+c)^2)-161/334084*arctan(tan(d*x+c))-5/102/(3+5*tan(d*x+c))^3-15/1156/(3+5*tan(d*x+c
))^2-5/19652/(3+5*tan(d*x+c))-60/83521*ln(3+5*tan(d*x+c)))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 157 vs. \(2 (78) = 156\).

Time = 0.25 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.78 \[ \int \frac {1}{(3+5 \tan (c+d x))^4} \, dx=-\frac {375 \, {\left (161 \, d x + 135\right )} \tan \left (d x + c\right )^{3} + 75 \, {\left (1449 \, d x + 1300\right )} \tan \left (d x + c\right )^{2} + 13041 \, d x + 360 \, {\left (125 \, \tan \left (d x + c\right )^{3} + 225 \, \tan \left (d x + c\right )^{2} + 135 \, \tan \left (d x + c\right ) + 27\right )} \log \left (\frac {25 \, \tan \left (d x + c\right )^{2} + 30 \, \tan \left (d x + c\right ) + 9}{\tan \left (d x + c\right )^{2} + 1}\right ) + 45 \, {\left (1449 \, d x + 2830\right )} \tan \left (d x + c\right ) + 101375}{1002252 \, {\left (125 \, d \tan \left (d x + c\right )^{3} + 225 \, d \tan \left (d x + c\right )^{2} + 135 \, d \tan \left (d x + c\right ) + 27 \, d\right )}} \]

[In]

integrate(1/(3+5*tan(d*x+c))^4,x, algorithm="fricas")

[Out]

-1/1002252*(375*(161*d*x + 135)*tan(d*x + c)^3 + 75*(1449*d*x + 1300)*tan(d*x + c)^2 + 13041*d*x + 360*(125*ta
n(d*x + c)^3 + 225*tan(d*x + c)^2 + 135*tan(d*x + c) + 27)*log((25*tan(d*x + c)^2 + 30*tan(d*x + c) + 9)/(tan(
d*x + c)^2 + 1)) + 45*(1449*d*x + 2830)*tan(d*x + c) + 101375)/(125*d*tan(d*x + c)^3 + 225*d*tan(d*x + c)^2 +
135*d*tan(d*x + c) + 27*d)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 790 vs. \(2 (78) = 156\).

Time = 0.47 (sec) , antiderivative size = 790, normalized size of antiderivative = 8.98 \[ \int \frac {1}{(3+5 \tan (c+d x))^4} \, dx=\text {Too large to display} \]

[In]

integrate(1/(3+5*tan(d*x+c))**4,x)

[Out]

Piecewise((-60375*d*x*tan(c + d*x)**3/(125281500*d*tan(c + d*x)**3 + 225506700*d*tan(c + d*x)**2 + 135304020*d
*tan(c + d*x) + 27060804*d) - 108675*d*x*tan(c + d*x)**2/(125281500*d*tan(c + d*x)**3 + 225506700*d*tan(c + d*
x)**2 + 135304020*d*tan(c + d*x) + 27060804*d) - 65205*d*x*tan(c + d*x)/(125281500*d*tan(c + d*x)**3 + 2255067
00*d*tan(c + d*x)**2 + 135304020*d*tan(c + d*x) + 27060804*d) - 13041*d*x/(125281500*d*tan(c + d*x)**3 + 22550
6700*d*tan(c + d*x)**2 + 135304020*d*tan(c + d*x) + 27060804*d) - 90000*log(5*tan(c + d*x) + 3)*tan(c + d*x)**
3/(125281500*d*tan(c + d*x)**3 + 225506700*d*tan(c + d*x)**2 + 135304020*d*tan(c + d*x) + 27060804*d) - 162000
*log(5*tan(c + d*x) + 3)*tan(c + d*x)**2/(125281500*d*tan(c + d*x)**3 + 225506700*d*tan(c + d*x)**2 + 13530402
0*d*tan(c + d*x) + 27060804*d) - 97200*log(5*tan(c + d*x) + 3)*tan(c + d*x)/(125281500*d*tan(c + d*x)**3 + 225
506700*d*tan(c + d*x)**2 + 135304020*d*tan(c + d*x) + 27060804*d) - 19440*log(5*tan(c + d*x) + 3)/(125281500*d
*tan(c + d*x)**3 + 225506700*d*tan(c + d*x)**2 + 135304020*d*tan(c + d*x) + 27060804*d) + 45000*log(tan(c + d*
x)**2 + 1)*tan(c + d*x)**3/(125281500*d*tan(c + d*x)**3 + 225506700*d*tan(c + d*x)**2 + 135304020*d*tan(c + d*
x) + 27060804*d) + 81000*log(tan(c + d*x)**2 + 1)*tan(c + d*x)**2/(125281500*d*tan(c + d*x)**3 + 225506700*d*t
an(c + d*x)**2 + 135304020*d*tan(c + d*x) + 27060804*d) + 48600*log(tan(c + d*x)**2 + 1)*tan(c + d*x)/(1252815
00*d*tan(c + d*x)**3 + 225506700*d*tan(c + d*x)**2 + 135304020*d*tan(c + d*x) + 27060804*d) + 9720*log(tan(c +
 d*x)**2 + 1)/(125281500*d*tan(c + d*x)**3 + 225506700*d*tan(c + d*x)**2 + 135304020*d*tan(c + d*x) + 27060804
*d) - 6375*tan(c + d*x)**2/(125281500*d*tan(c + d*x)**3 + 225506700*d*tan(c + d*x)**2 + 135304020*d*tan(c + d*
x) + 27060804*d) - 72675*tan(c + d*x)/(125281500*d*tan(c + d*x)**3 + 225506700*d*tan(c + d*x)**2 + 135304020*d
*tan(c + d*x) + 27060804*d) - 90440/(125281500*d*tan(c + d*x)**3 + 225506700*d*tan(c + d*x)**2 + 135304020*d*t
an(c + d*x) + 27060804*d), Ne(d, 0)), (x/(5*tan(c) + 3)**4, True))

Maxima [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.06 \[ \int \frac {1}{(3+5 \tan (c+d x))^4} \, dx=-\frac {483 \, d x + 483 \, c + \frac {85 \, {\left (75 \, \tan \left (d x + c\right )^{2} + 855 \, \tan \left (d x + c\right ) + 1064\right )}}{125 \, \tan \left (d x + c\right )^{3} + 225 \, \tan \left (d x + c\right )^{2} + 135 \, \tan \left (d x + c\right ) + 27} - 360 \, \log \left (\tan \left (d x + c\right )^{2} + 1\right ) + 720 \, \log \left (5 \, \tan \left (d x + c\right ) + 3\right )}{1002252 \, d} \]

[In]

integrate(1/(3+5*tan(d*x+c))^4,x, algorithm="maxima")

[Out]

-1/1002252*(483*d*x + 483*c + 85*(75*tan(d*x + c)^2 + 855*tan(d*x + c) + 1064)/(125*tan(d*x + c)^3 + 225*tan(d
*x + c)^2 + 135*tan(d*x + c) + 27) - 360*log(tan(d*x + c)^2 + 1) + 720*log(5*tan(d*x + c) + 3))/d

Giac [A] (verification not implemented)

none

Time = 0.37 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.95 \[ \int \frac {1}{(3+5 \tan (c+d x))^4} \, dx=-\frac {483 \, d x + 483 \, c - \frac {25 \, {\left (6600 \, \tan \left (d x + c\right )^{3} + 11625 \, \tan \left (d x + c\right )^{2} + 4221 \, \tan \left (d x + c\right ) - 2192\right )}}{{\left (5 \, \tan \left (d x + c\right ) + 3\right )}^{3}} - 360 \, \log \left (\tan \left (d x + c\right )^{2} + 1\right ) + 720 \, \log \left ({\left | 5 \, \tan \left (d x + c\right ) + 3 \right |}\right )}{1002252 \, d} \]

[In]

integrate(1/(3+5*tan(d*x+c))^4,x, algorithm="giac")

[Out]

-1/1002252*(483*d*x + 483*c - 25*(6600*tan(d*x + c)^3 + 11625*tan(d*x + c)^2 + 4221*tan(d*x + c) - 2192)/(5*ta
n(d*x + c) + 3)^3 - 360*log(tan(d*x + c)^2 + 1) + 720*log(abs(5*tan(d*x + c) + 3)))/d

Mupad [B] (verification not implemented)

Time = 5.45 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.18 \[ \int \frac {1}{(3+5 \tan (c+d x))^4} \, dx=-\frac {60\,\ln \left (\mathrm {tan}\left (c+d\,x\right )+\frac {3}{5}\right )}{83521\,d}-\frac {\frac {{\mathrm {tan}\left (c+d\,x\right )}^2}{19652}+\frac {57\,\mathrm {tan}\left (c+d\,x\right )}{98260}+\frac {266}{368475}}{d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^3+\frac {9\,{\mathrm {tan}\left (c+d\,x\right )}^2}{5}+\frac {27\,\mathrm {tan}\left (c+d\,x\right )}{25}+\frac {27}{125}\right )}+\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )\,\left (\frac {30}{83521}+\frac {161}{668168}{}\mathrm {i}\right )}{d}+\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,\left (\frac {30}{83521}-\frac {161}{668168}{}\mathrm {i}\right )}{d} \]

[In]

int(1/(5*tan(c + d*x) + 3)^4,x)

[Out]

(log(tan(c + d*x) - 1i)*(30/83521 + 161i/668168))/d + (log(tan(c + d*x) + 1i)*(30/83521 - 161i/668168))/d - (6
0*log(tan(c + d*x) + 3/5))/(83521*d) - ((57*tan(c + d*x))/98260 + tan(c + d*x)^2/19652 + 266/368475)/(d*((27*t
an(c + d*x))/25 + (9*tan(c + d*x)^2)/5 + tan(c + d*x)^3 + 27/125))